import { useSelector } from "react-redux"
const Home = () => {
    const state = useSelector(state => state.login)
    const { isAuth, user } = state
    return (
        <div>
            <div className="jumbotron">
                <h1 className="display-4">Welcome! {isAuth ? <span style={{color: 'red'}}>{user.username}</span>: '未登录用户'}</h1>
            </div>
        </div>
    )
}
export default Home